package org.pearl.spring.mybatis.demo.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.pearl.spring.mybatis.demo.pojo.entity.User;

/**
 * Created by TD on 2021/6/5
 */
public interface UserMapper {


    @Select("SELECT * FROM base_user WHERE user_id = #{userId}")
    User getUser(@Param("userId") Long userId);

    @Update("UPDATE base_user SET base_user.address=#{address} WHERE base_user.user_id= 1")
    int update(String address);

}
